//
//  PGVoiceView.m
//  youqu
//
//  Created by 彭鹏 on 16/10/17.
//  Copyright © 2016年 pengpeng. All rights reserved.
//

#import "PGVoiceView.h"
#import "PGPostItem.h"
#import <SDWebImage/UIImageView+WebCache.h>
@interface PGVoiceView ()
@property (weak, nonatomic) IBOutlet UILabel *playCountLabel;
@property (weak, nonatomic) IBOutlet UILabel *playTimeLabel;
@property (weak, nonatomic) IBOutlet UIImageView *voiceImageView;
@end


@implementation PGVoiceView

- (IBAction)playButtonClick {
    
}

- (void)setItem:(PGPostItem *)item {
    _item = item;
    [_voiceImageView sd_setImageWithURL:[NSURL URLWithString:item.image0]];
    _playTimeLabel.text = [NSString stringWithFormat:@"%zd时间",item.voicetime];
    _playCountLabel.text = [NSString stringWithFormat:@"%zd播放",item.playcount];
}


+ (instancetype)voiceView {
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] firstObject];
}



@end
